package com.google.agerasample.slice;

import com.google.agerasample.ResourceTable;

import ohos.aafwk.ability.AbilitySlice;
import ohos.aafwk.content.Intent;

public class NavigationAbilitySlice extends AbilitySlice {
    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
        setUIContent(ResourceTable.Layout_slice_navigation);
        findComponentById(ResourceTable.Id_btn1)
                .setClickedListener(listener -> present(new MainAbilitySlice(), new Intent()));
        findComponentById(ResourceTable.Id_btn2)
                .setClickedListener(listener -> present(new BasicsamAbilitySlice(), new Intent()));
        findComponentById(ResourceTable.Id_btn3)
                .setClickedListener(listener -> present(new BasicsamwotcbkAbilitySlice(), new Intent()));
        findComponentById(ResourceTable.Id_btn4)
                .setClickedListener(listener -> present(new NotesAbilitySlice(), new Intent()));
    }
}
